package com.crm.web.controller.crm;


import com.crm.business.crm.service.ICrmRoiStatisService;
import com.crm.business.crm.service.ICrmRoiYearStatisService;
import com.crm.common.ka.core.common.R;
import com.crm.common.ka.core.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 投放统计表 前端控制器
 * </p>
 *
 * @author zhangzhiwei
 * @since 2020-05-21
 */
@RestController
@RequestMapping("/api/crmRoiStatis")
@Api(tags = "投放统计模块接口")
public class ApiCrmRoiStatisController {

    @Autowired
    private ICrmRoiStatisService crmRoiStatisService;
    @Autowired
    private ICrmRoiYearStatisService crmRoiYearStatisService;

    @PostMapping("/statisRoi")
    @ApiOperation("ROI汇总统计")
    public Result statisRoi(){
        crmRoiStatisService.statisRoi();
        return R.ok();
    }

    @PostMapping("/yearRoiStatis")
    @ApiOperation("ROI年度统计")
    public Result yearRoiStatis(){
        crmRoiYearStatisService.statisYearRoi();
        return R.ok();
    }

}
